Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- include './system/common.php';
- include './system/functions.php';
- include './system/user.php';
- if(!$user) {
- header('location: /');
- exit;
- }
- $title = 'Мятеж';
- include './system/h.php';
- if($user['level'] > 3) {
- $opponent_str = rand(10, 100);
- $opponent_vit = rand(10, 100);
- $opponent_agi = rand(10, 100);
- $opponent_def = rand(10, 100);
- $opponent_hp = $opponent_vit * 2;
- $member = mysql_query('SELECT * FROM `undying_member` WHERE `user` = "'.$user['id'].'" ORDER BY `id` DESC LIMIT 1');
- $member = mysql_fetch_array($member);
- $battle = mysql_query('SELECT * FROM `undying` WHERE `id` = "'.$member['battle'].'"');
- $battle = mysql_fetch_array($battle);
- if($member['exit'] == 0 && $battle['start'] == 1 && $battle['end'] == 0) {
- $titans = mysql_result(mysql_query('SELECT COUNT(*) FROM `undying_member` WHERE `dead` = "0" AND `battle` = "'.$battle['id'].'"'),0);
- if($titans == 0 OR $battle['opponents'] == 0) {
- mysql_query('UPDATE `undying` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"');
- header('location: /undying/');
- exit;
- }
- if($battle['time'] < time()) {
- mysql_query('UPDATE `undying` SET `end` = "1" WHERE `id` = "'.$battle['id'].'"');
- header('location: /undying/');
- exit;
- }
- ?>
- <div class='content'><font color='#ff9'><span style='float: right;'><?=_time($battle['time'] - time())?></span> Мятеж</font></div>
- <?
- if($member['dead'] == 0) {
- if($_GET['attack'] == true && $battle['opponents']) {
- if($member['time'] > time() OR $user['mp'] < 50) {
- header('location: /undying/');
- exit;
- }
- if($user['ability_1'] > 0) {
- switch($user['ability_1']) {
- case 0:
- $a_1_bonus = 25;
- $a_1_chanse = 5;
- break;
- case 1:
- $a_1_bonus = 25;
- $a_1_chanse = 5;
- break;
- case 2:
- $a_1_bonus = 30;
- $a_1_chanse = 5;
- break;
- case 3:
- $a_1_bonus = 35;
- $a_1_chanse = 5;
- break;
- case 4:
- $a_1_bonus = 40;
- $a_1_chanse = 5;
- break;
- case 5:
- $a_1_bonus = 45;
- $a_1_chanse = 5;
- break;
- case 6:
- $a_1_bonus = 45;
- $a_1_chanse = 8;
- break;
- case 7:
- $a_1_bonus = 50;
- $a_1_chanse = 8;
- break;
- case 8:
- $a_1_bonus = 55;
- $a_1_chanse = 8;
- break;
- case 9:
- $a_1_bonus = 60;
- $a_1_chanse = 8;
- break;
- case 10:
- $a_1_bonus = 65;
- $a_1_chanse = 8;
- break;
- case 11:
- $a_1_bonus = 65;
- $a_1_chanse = 11;
- break;
- case 12:
- $a_1_bonus = 70;
- $a_1_chanse = 11;
- break;
- case 13:
- $a_1_bonus = 75;
- $a_1_chanse = 11;
- break;
- case 14:
- $a_1_bonus = 80;
- $a_1_chanse = 11;
- break;
- case 15:
- $a_1_bonus = 85;
- $a_1_chanse = 11;
- break;
- case 16:
- $a_1_bonus = 85;
- $a_1_chanse = 14;
- break;
- case 17:
- $a_1_bonus = 90;
- $a_1_chanse = 14;
- break;
- case 18:
- $a_1_bonus = 95;
- $a_1_chanse = 14;
- break;
- case 19:
- $a_1_bonus = 100;
- $a_1_chanse = 14;
- break;
- case 20:
- $a_1_bonus = 105;
- $a_1_chanse = 14;
- break;
- case 21:
- $a_1_bonus = 105;
- $a_1_chanse = 17;
- break;
- case 22:
- $a_1_bonus = 145;
- $a_1_chanse = 20;
- break;
- case 23:
- $a_1_bonus = 165;
- $a_1_chanse = 23;
- break;
- case 24:
- $a_1_bonus = 165;
- $a_1_chanse = 23;
- break;
- }
- if(mt_rand(0, 100) <= $a_1_chanse) {
- $a_1 = true;
- }
- }
- if($user['ability_2'] > 0) {
- switch($user['ability_2']) {
- case 0:
- $a_2_bonus = 25;
- $a_2_chanse = 5;
- break;
- case 1:
- $a_2_bonus = 25;
- $a_2_chanse = 5;
- break;
- case 2:
- $a_2_bonus = 30;
- $a_2_chanse = 5;
- break;
- case 3:
- $a_2_bonus = 35;
- $a_2_chanse = 5;
- break;
- case 4:
- $a_2_bonus = 40;
- $a_2_chanse = 5;
- break;
- case 5:
- $a_2_bonus = 45;
- $a_2_chanse = 5;
- break;
- case 6:
- $a_2_bonus = 45;
- $a_2_chanse = 8;
- break;
- case 7:
- $a_2_bonus = 50;
- $a_2_chanse = 8;
- break;
- case 8:
- $a_2_bonus = 55;
- $a_2_chanse = 8;
- break;
- case 9:
- $a_2_bonus = 60;
- $a_2_chanse = 8;
- break;
- case 10:
- $a_2_bonus = 65;
- $a_2_chanse = 8;
- break;
- case 11:
- $a_2_bonus = 65;
- $a_2_chanse = 11;
- break;
- case 12:
- $a_2_bonus = 70;
- $a_2_chanse = 11;
- break;
- case 13:
- $a_2_bonus = 75;
- $a_2_chanse = 11;
- break;
- case 14:
- $a_2_bonus = 80;
- $a_2_chanse = 11;
- break;
- case 15:
- $a_2_bonus = 85;
- $a_2_chanse = 11;
- break;
- case 16:
- $a_2_bonus = 85;
- $a_2_chanse = 14;
- break;
- case 17:
- $a_2_bonus = 90;
- $a_2_chanse = 14;
- break;
- case 18:
- $a_2_bonus = 95;
- $a_2_chanse = 14;
- break;
- case 19:
- $a_2_bonus = 100;
- $a_2_chanse = 14;
- break;
- case 20:
- $a_2_bonus = 105;
- $a_2_chanse = 14;
- break;
- case 21:
- $a_2_bonus = 105;
- $a_2_chanse = 17;
- break;
- case 22:
- $a_2_bonus = 145;
- $a_2_chanse = 20;
- break;
- case 23:
- $a_2_bonus = 165;
- $a_2_chanse = 23;
- break;
- case 24:
- $a_2_bonus = 165;
- $a_2_chanse = 23;
- break;
- }
- if(mt_rand(0, 100) <= $a_2_chanse) {
- $a_2 = true;
- }
- }
- if($user['ability_3'] > 0) {
- switch($user['ability_3']) {
- case 0:
- $a_3_bonus = 5;
- $a_3_crit_chanse = 5;
- $a_3_chanse = 20;
- break;
- case 1:
- $a_3_bonus = 5;
- $a_3_crit_chanse = 5;
- $a_3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement